package edu.nf.waimai.service.user.impl;

import edu.nf.waimai.dao.user.ShoppingDAO;
import edu.nf.waimai.dao.user.impl.ShopPingDAOImpl;
import edu.nf.waimai.model.user.ShoppingCart;
import edu.nf.waimai.model.user.UserShopPingCart;
import edu.nf.waimai.service.user.ShoppingService;

import java.util.List;

/**
 * @Date 2023/7/3
 * @Author zgm
 */
public class ShoppingServiceImpl implements ShoppingService {
    @Override
    public int addShopPing(ShoppingCart shopping) {
        ShoppingDAO dao = new ShopPingDAOImpl();
        return dao.addShopPing(shopping);
    }

    @Override
    public List<UserShopPingCart> listShopping(int userId, int shopId) {
        ShoppingDAO dao = new ShopPingDAOImpl();
        return dao.listShopping(userId,shopId);
    }

    @Override
    public int updateShopPing(int userId, int shopId) {
        ShoppingDAO dao = new ShopPingDAOImpl();
        return dao.updateShopPing(userId,shopId);
    }
}
